package ${fragmentPackageName}

import android.os.Bundle

import androidx.annotation.NonNull
import androidx.annotation.Nullable

import com.jpxx.base.ui.mvp.base.IBaseFragment
import com.jpxx.base.ui.mvp.di.component.AppComponent

import ${componentPackageName}.Dagger${pageName}Component
import ${moudlePackageName}.${pageName}Module
import ${contractPackageName}.${pageName}Contract
import ${presenterPackageName}.${pageName}Presenter

import ${packageName}.R

/**
 * 如有封装BaseFragment，请继承于BaseFragment
 */
class ${pageName}Fragment : BaseFragment<${pageName}Presenter>() , ${pageName}Contract.View{
    companion object {
        fun newInstance():${pageName}Fragment {
            val fragment = ${pageName}Fragment()
            return fragment
        }
    }

    override fun setupFragmentComponent(appComponent:AppComponent) {
        Dagger${pageName}Component //如找不到该类,请编译一下项目
                .builder()
                .appComponent(appComponent)
                .${extractLetters(pageName[0]?lower_case)}${pageName?substring(1,pageName?length)}Module(${pageName}Module(this))
                .build()
                .inject(this)
    }

    override fun getLayoutResourceId() : Int = R.layout.${fragmentLayoutName}

    override fun initView() {

    }

    override fun initListener() {

    }

    override fun initData() {

    }

    override fun showLoading() {

    }

    override fun hideLoading() {

    }

    override fun showMessage(message:String) {

    }
}
